package edu.zzu.Entity;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.sql.Date;
import java.sql.Time;

@Data
@Table(name="Package")
public class Package {

    @Id
    private String id;

    @Column(name="SourceNode")
    private String sourceNode;

    @Column(name="TargetNode")
    private String targetNode;

    @Column(name="UpdateTime")
    private String updateTime;

    @Column(name="Status")
    private Integer status;

    private String sender;

    private String receiver;

    @Column(name="SenderTel")
    private String senderTel;

    @Column(name="ReceiverTel")
    private String receiverTel;

    private Long handler;

    @Column(name="UserId")
    private Long userId;

    @Column(name="TransNodeId")
    private Long transNodeId;

    @Column(name="SenderAddr")
    private String senderAddr;

    @Column(name="ReceiverAddr")
    private String receiverAddr;

    private Float x;

    private Float y;

    public Package(String id, String sourceNode, String targetNode, String updateTime, Integer status, String sender, String receiver,
                   String senderTel, String receiverTel, Long handler, Long userId, Long transNodeId, String senderAddr,
                   String receiverAddr) {
        this.id=id;
        this.sourceNode=sourceNode;
        this.targetNode=targetNode;
        this.updateTime=updateTime;
        this.status=status;
        this.sender=sender;
        this.receiver=receiver;
        this.senderTel=senderTel;
        this.receiverTel=receiverTel;
        this.handler=handler;
        this.userId=userId;
        this.transNodeId=transNodeId;
        this.senderAddr=senderAddr;
        this.receiverAddr=receiverAddr;
    }

    public Package(String id, String sourceNode, String targetNode, String updateTime, Integer status, String sender, String receiver,
                   String senderTel, String receiverTel, Long handler, Long userId, Long transNodeId, String senderAddr,
                   String receiverAddr, Float x, Float y) {
        this.id = id;
        this.sourceNode = sourceNode;
        this.targetNode = targetNode;
        this.updateTime = updateTime;
        this.status = status;
        this.sender = sender;
        this.receiver = receiver;
        this.senderTel = senderTel;
        this.receiverTel = receiverTel;
        this.handler = handler;
        this.userId = userId;
        this.transNodeId = transNodeId;
        this.senderAddr = senderAddr;
        this.receiverAddr = receiverAddr;
        this.x = x;
        this.y = y;
    }
}
